The present invention refers to a method of selecting an electronic module from a plurality of modules present in the interrogation field of a terminal, in order to establish a communication between the terminal and the selected module.
In some applications, it happens that several electronic modules try to establish a communication with a terminal at the same moment. This is in particular the case with electronic labels and contactless chip cards when several of these elements are at the same time in the interrogation field of a terminal.
Such a situation is illustrated in FIG. 1, where a terminal T can be seen in the presence of several electronic modules M1, M2, M3. The terminal T is provided with a communication interface IT enabling the terminal to send messages to the modules and to receive messages emitted by these modules. The modules M are provided with communication interfaces IM enabling them to send messages to the terminal and to receive messages from the terminal.
The terminal has to establish a communication with one of the modules, without preference, to perform operations required by the application, for example a monetary transaction, an identification operation to provide a passage authorisation, a toll operation or simply an identification of the modules which are present. Moreover, this communication, once established, must not be disturbed by messages coming from other modules. In an opposite case, message collisions would occur, which would lead to the reception of electrically disturbed signals and erroneous messages by the terminal.
As a general rule, the terminal does not know the identity of the modules which are present in its interrogation field. This means that it is not possible, generally, that the terminal sends a particular message to a module to render it active, while the others would remain silent. It is also not possible to let the initiative of the communication to the modules, because the latter would emit communication requests in an uncoordinated way which would collide one another or disturb a communication already established with another module. Thus, the generally adopted solution is that the terminal sends a general interrogation message to the modules, then the terminal sorts out the various received answers till one and only one module is selected.
In the prior art, a selection method based on a message surcoding enabling the bit by bit detection of collisions is known. For example, as shown in FIGS. 2A and 2B, the logic xe2x80x9c1xe2x80x9d of the basic coding is coded xe2x80x9c10xe2x80x9d and the logic xe2x80x9c0xe2x80x9d is coded xe2x80x9c01xe2x80x9d. Thus, when a xe2x80x9c1xe2x80x9d bit (coded xe2x80x9c10xe2x80x9d) of a message emitted by a module enters in collision with a xe2x80x9c0xe2x80x9d bit (coded xe2x80x9c01xe2x80x9d) of a message emitted by another module, the terminal receives a code xe2x80x9c00xe2x80x9d or collision code C, the xe2x80x9c0xe2x80x9d of the basic coding prevailing over the xe2x80x9c1xe2x80x9d (the xe2x80x9c0xe2x80x9d corresponding for instance to the ground of the circuit).
To understand the selecting method of the prior art, let""s consider now, as a matter of example, the simple case where, in reply to a general interrogation message, the three modules of FIG. 1 send simultaneously the following identification codes to the terminal:
Module 1/code 1: 0 1 0 0
Module 2/code 2 1 1 0 0
Module 3/code 3 1 0 1 1
As each bit of a code is in collision with at least one bit in the same place of another code, the result at the reception is the following:
C C C C
The terminal then requests that the modules having sent an identification code whose first bit is 1 to send again this code (the terminal could also, in a random way, request that only the codes whose first bit is 0 are sent back). The following codes will be sent by the concerned modules:
Code 2: 1 1 0 0
Code 3: 1 0 1 1
The result at the reception of this selective interrogation is the following:
1 C C C
As these is no more collision on the first bit, the terminal will treat the collision on the second bit, by requesting for example that only the messages having 0 as second bit are sent back. After this second selective interrogation, the terminal receives the code 3 without collision and sends it back to all the modules. Module M3 which has emitted it recognises itself and is thus selected.
This conventional selection method can be applied to a large number of modules but has various drawbacks:
the selecting process is rather slow and requires a lot of queries, each new interrogation statistically allowing the selection of only half the modules which were selected at the previous interrogation,
the probability of a collision at the first interrogation depends not only on the number of modules which are actually present in the interrogation field, but also on the number of bits that the module identification codes comprise,
this method is not easy to carry out, because it requires a bit by bit collision detection and therefore the use of a particular coding of the 1s and 0s as described above,
this selection method by bit by bit detection of collisions requires a perfect synchronisation of the various modules, so that the identification code bits emitted by the various modules are perfectly superposed.
Thus, one object of the present invention is to provide a fast selection method.
Another object of the present invention is to provide a selection method which is easy to carry out.
Yet another object of the present invention is to provide a selection method which can be applied to imperfectly synchronised modules.
These objects are obtained by a method of selecting an electronic module from a plurality of at least two modules capable of emitting messages simultaneously, comprising steps consisting in sending a general interrogation message to the modules, the modules being designed, on receiving a interrogation message, to determine a random time interval, then send a response message when the time interval has elapsed; selecting the module having responded first; setting in an idle state the modules having not responded first.
When several modules have responded simultaneously to a interrogation message, there are provided the steps consisting in sending a complementary interrogation message to the modules having responded first, selecting the module having responded first to the complementary interrogation message, and setting in an idle state the modules having not responded first.
According to one embodiment, a module sets itself automatically in an idle state when it receives a message before the time interval preceding the sending of a response has elapsed.
According to one embodiment, a module is also set by its own in an idle state when it receives a non identifiable or unplanned message after having replied to a interrogation message.
Preferably, the idle state is characterised at least by the fact that a module does not respond to a complementary interrogation message.
According to one embodiment, the modules are designed to send, in reply to a interrogation message, an identification message comprising identification data.
According to one embodiment, the modules are designed to send, in reply to a interrogation message, a response message comprising a low number of bits, an identification request is sent to the modules immediately after the reception of at least one response message, and the modules are designed to send, in reply to the identification request, an identification message comprising identification data.
Preferably, a step of sending, to the selected module, a selection confirmation message comprising module identification data is provided.
Preferably, the modules are designed to emit the response message on a temporal response scale comprising a plurality of response positions.
The present invention is particularly suitable for a method of establishing a communication between a terminal and an electronic module, wherein the terminal selects the module with the method according to the invention before communicating with the module.
The present invention refers also to an electronic module designed to determine a random time interval on receiving a interrogation message, then send a response message when the time interval has elapsed and set itself in an idle state when a message is received before the time interval has elapsed.
The present invention refers also to an electronic terminal designed to send a general interrogation message and wait for a response message, detect an eventual collision in a received message, and, if a collision is detected, send a complementary interrogation message and wait for a new response message; if no collision is detected, it sends a selection confirmation message comprising identification data which are comprised in a received identification message.